<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<!-- 头部导航栏 -->
<jsp:include page="../header.jsp"></jsp:include>
<title>===标题===</title>
<script type="text/javascript">
$(document).ready(function() {
	//提交表单验证
	$("#data_form").submit(function () {
				
		//角色组名称合法性验证
		var groupName = $("#id_groupName").val();
		if(groupName && groupName.length>20) {
			$("#im_groupName").html("角色组名称不能超过20个字符！").show();pass = false;
		}else {
			$("#im_groupName").hide();
		}
		
		//角色组标识合法性验证
		var groupSign = $("#id_groupSign").val();
		if(groupSign && groupSign.length>20) {
			$("#im_groupSign").html("角色组标识不能超过20个字符！").show();pass = false;
		}else {
			$("#im_groupSign").hide();
		}
		
		//描述信息合法性验证
		var description = $("#id_description").val();
		if(description && description.length>20) {
			$("#im_description").html("描述信息不能超过20个字符！").show();pass = false;
		}else {
			$("#im_description").hide();
		}
		
		//合法性验证
		var createrId = $("#id_createrId").val();
		if(createrId && createrId.length>20) {
			$("#im_createrId").html("不能超过20个字符！").show();pass = false;
		}else {
			$("#im_createrId").hide();
		}
		
		//合法性验证
		var createrName = $("#id_createrName").val();
		if(createrName && createrName.length>20) {
			$("#im_createrName").html("不能超过20个字符！").show();pass = false;
		}else {
			$("#im_createrName").hide();
		}
		
		//合法性验证
		var createDate = $("#id_createDate").val();
		if(createDate && createDate.length>20) {
			$("#im_createDate").html("不能超过20个字符！").show();pass = false;
		}else {
			$("#im_createDate").hide();
		}
	});
});
</script>
</head>
<body>
	<div class="container dz-main">
		<!--标题和按钮组===begin===-->
		<div class="dz-head">
			<div class="dz-title">管理</div>
			<div class="dz-head-btns">
				<a class="btn btn-success btn-sm" href="<%=request.getContextPath()%>/security/group/index.do">返回</a>
			</div>
		</div>
		<!--标题和按钮组===end===-->
		<!--表单数据===begin===-->
		<form id="data_form" class="form-horizontal" action="<%=request.getContextPath()%>/security/group/save.do" method="post">
			<div>
				<input type="hidden" name="groupId" value="${obj.groupId}"/>
			</div>
			<div class="form-group">
				<label for="id_groupName" class="col-xs-2 control-label">角色组名称</label>
				<div class="col-xs-6">
					<input id="id_groupName" type="text" class="form-control" name="groupName" value="${obj.groupName}"/>
				</div>
				<div id="im_groupName" class="col-xs-4 dz-info"></div>
			</div>
			<div class="form-group">
				<label for="id_groupSign" class="col-xs-2 control-label">角色组标识</label>
				<div class="col-xs-6">
					<input id="id_groupSign" type="text" class="form-control" name="groupSign" value="${obj.groupSign}"/>
				</div>
				<div id="im_groupSign" class="col-xs-4 dz-info"></div>
			</div>
			<div class="form-group">
				<label for="id_description" class="col-xs-2 control-label">描述信息</label>
				<div class="col-xs-6">
					<input id="id_description" type="text" class="form-control" name="description" value="${obj.description}"/>
				</div>
				<div id="im_description" class="col-xs-4 dz-info"></div>
			</div>
			<div class="form-group">
				<label for="id_createrId" class="col-xs-2 control-label"></label>
				<div class="col-xs-6">
					<input id="id_createrId" type="text" class="form-control" name="createrId" value="${obj.createrId}"/>
				</div>
				<div id="im_createrId" class="col-xs-4 dz-info"></div>
			</div>
			<div class="form-group">
				<label for="id_createrName" class="col-xs-2 control-label"></label>
				<div class="col-xs-6">
					<input id="id_createrName" type="text" class="form-control" name="createrName" value="${obj.createrName}"/>
				</div>
				<div id="im_createrName" class="col-xs-4 dz-info"></div>
			</div>
			<div class="form-group">
				<label for="id_createDate" class="col-xs-2 control-label"></label>
				<div class="col-xs-6">
					<input id="id_createDate" type="text" class="form-control" name="createDate" value="${obj.createDate}"/>
				</div>
				<div id="im_createDate" class="col-xs-4 dz-info"></div>
			</div>
			<div class="dz-submit-b">
				<button type="submit" class="btn btn-primary">保存</button>
			</div>
		</form>
		<!--表单数据===end===-->
	</div>
</body>
</html>